import request from '@/utils/request'

// 创建ERP 二级库台账
export function createSecAccount(data) {
  return request({
    url: '/erp/sec-account/create',
    method: 'post',
    data: data
  })
}
export function createListSecAccount(data) {
  return request({
    url: '/erp/sec-account/createList',
    method: 'post',
    data: data
  })
}

// 更新ERP 二级库台账
export function updateSecAccount(data) {
  return request({
    url: '/erp/sec-account/update',
    method: 'put',
    data: data
  })
}

// 删除ERP 二级库台账
export function deleteSecAccount(id) {
  return request({
    url: '/erp/sec-account/delete?id=' + id,
    method: 'delete'
  })
}

// 获得ERP 二级库台账
export function getSecAccount(id) {
  return request({
    url: '/erp/sec-account/get?id=' + id,
    method: 'get'
  })
}

// 获得ERP 二级库台账分页
export function getSecAccountPage(params) {
  return request({
    url: '/erp/sec-account/page',
    method: 'get',
    params
  })
}
// 导出ERP 二级库台账 Excel
export function exportSecAccountExcel(params) {
  return request({
    url: '/erp/sec-account/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}